from typing import Optional
from pydantic import BaseModel, Field


class AIConfigCreate(BaseModel):
    config_key: str = Field(..., description="配置键")
    config_value: str = Field(..., description="配置值")
    config_name: str = Field(..., description="配置名称")
    description: Optional[str] = Field(None, description="配置描述")
    remark: Optional[str] = Field(None, description="备注")
    is_system: bool = Field(False, description="是否为系统配置")


class AIConfigUpdate(BaseModel):
    id: int = Field(..., description="配置ID")
    config_key: str = Field(..., description="配置键")
    config_value: str = Field(..., description="配置值")
    config_name: str = Field(..., description="配置名称")
    description: Optional[str] = Field(None, description="配置描述")
    remark: Optional[str] = Field(None, description="备注")
    is_system: bool = Field(False, description="是否为系统配置")

